<?php


namespace app\models\goods;


use think\Model;

class GoodsModel extends Model
{
    protected $name = 'goods';

    protected $autoWriteTimestamp = true;

    public function setBannerAttr($value)
    {
        return json_encode($value);
    }

    public function getBannerAttr($value)
    {
        return json_decode($value, true);
    }

    public function setDetailAttr($value)
    {
        return json_encode($value);
    }

    public function getDetailAttr($value)
    {
        return json_decode($value, true);
    }
}